<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>dynamicdiv</title>
    <script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
    <script type="text/javascript">
        function createOl(rowCount) {
            var ol = $("<ol>");
            ol.appendTo($("#createol"));
            for (var i = 0; i < rowCount; i++) {
                var li = $("<li></li>");
                li.appendTo(ol);
            }
            $("#createol").append("</ol>");
        }
    </script>
</head>

<body>
<input type="button" value="添加表格" onClick="createOl(5)" >
<input type="button" value="添加行">
<div id="createol"></div>
<div id="createrow"></div>
</body>
</html>
